package org.lvgo.decorator;

/**
 * @author lvgo
 * @version 1.0
 * @Description: 模拟小怪兽攻击
 * @date 18-8-23 下午1:31
 */
public class Client {

    public static void main(String[] args) {

        Troll simpleTroll = new SimpleTroll();
        simpleTroll.attack();
        System.out.println("小怪兽的攻击力" + simpleTroll.getAttackPower());
        simpleTroll.fleeBattle();

        System.out.println();

        Troll clubbedTroll = new ClubbedTroll(new SimpleTroll());
        clubbedTroll.attack();
        System.out.println("捡起小土块小怪兽的攻击力" + clubbedTroll.getAttackPower());
        clubbedTroll.fleeBattle();
    }
}
